
<template>
  <EleTableComp :config="config">
    <template v-slot:costomLook="slotData">
      <review-check :data="slotData.data"></review-check>
    </template>
    <template v-slot:costomCheck="slotData">
      <review-look :data="slotData.data"></review-look>
    </template>
  </EleTableComp>
</template>
<script>
  import EleTableComp from "@/components/EleTableComp";
  import {typeJson} from "@/components/EleTableComp/config";
  import ReviewCheck from "./reviewCheck";
  import ReviewLook from "./reviewLook";
  export default {
    data() {
      return {
        config: {
          header: {
            //breadcrumb: `${this.$store.state.mindName}隐患整改`,
            addButton: false,
            search: [
                 {
              type: "datePicker",
              value: "",
              prop: "startDate",
              label: "发现时间",
            },
            {
              type: "datePicker",
              value: "",
              prop: "endDate",
              label: "至",
            },
            {
              type: "dropDown",
              prop: "verifyStatus",
              value: "",
              label: "核查状态",
              list: typeJson.verifyStatus,
            },
            // {
            //   type: "dropDown",
            //   prop: "rectifyStatus",
            //   value: "",
            //   label: "整改状态",
            //   list: typeJson.rectifyStatus,
            // },
            {
              type: "dropDown",
              prop: "reviewStatus",
              value: "",
              label: "复查状态",
              list: typeJson.reviewStatus,
            },
            {
              type: "datePicker",
              value: "",
              prop: "expiresStartDate",
              label: "整改期限",
            },
            {
              type: "datePicker",
              value: "",
              prop: "expiresEndDate",
              label: "至",
            },
            {
              type: "dropDown",
              prop: "level",
              value: "",
              label: "隐患级别",
              list: typeJson.level,
            },
            {
              label: "隐患来源",
              prop: "source",
              type: "dropDown",
              list: typeJson.source,
              value: "",
            },
            {
              label: "发现方式",
              prop: "discoverWay",
              type: "dropDown",
              list: typeJson.riskRule,
              value: "",
            },
            ]
          },
          table: [
                {
            type: "index",
          },
          {
            label: "隐患描述",
            prop: "content",
            value: "",
            addEditType: "textArea",
            required: true,
             hidden:true,
          },
          {
            label: "来源",
            prop: "source",
            type: "dropDown",
            addEditType: "dropDown",
            list: typeJson.source,
            value: "",
            required: true,
          },
          {
            label: "部位",
            prop: "part",
 hidden:true,
            value: "",
          },
          {
            label: "级别",
            prop: "level",
            type: "dropDown",
            addEditHidden: "dropDown",
            list: typeJson.level,
            value: "",
            required: true,
          },
          {
            label: "隐患发现方式",
            prop: "discoverWay",
            type: "dropDown",
            addEditHidden: true,
            list: typeJson.riskRule,
            value: "",
             hidden:true,
          },
          {
            label: "发现人",
            prop: "discoverMan",
            value: "",
            required: true,
          },
          {
            label: "发现时间",
            prop: "discoverDate",
            value: "",
            addEditType: "timePicker",
            required: true,
          },
          {
            label: "核查时间",
            prop: "verifyDate",
            value: "",
            addEditType: "timePicker",
          },
          {
            label: "核查状态",
            prop: "verifyStatus",
            type: "dropDown",
            addEditHidden: true,
            list: typeJson.verifyStatus,
            value: "",
          },
          {
            label: "整改类型",
            prop: "rectifyType",
            addEditType: "dropDown",
            type: "dropDown",
            addEditHidden: true,
            list: typeJson.rectifyType,
            value: "",
          },
          {
            label: "整改方式",
            prop: "rectifyWay",
            type: "dropDown",
            list: typeJson.rectifyWay,
            addEditHidden: true,
             hidden:true,
            value: "",
          },
          {
            label: "整改期限",
            prop: "rectifyExpires",
            addEditHidden: true,
            value: "",
          },
          {
            label: "整改负责人",
            prop: "rectifyPerson",
            value: "",
            addEditHidden: true,
          },
          {
            label: "联系电话",
            prop: "phone",
            value: "",
            addEditHidden: true,
          },
          {
            label: "整改完成日期",
            prop: "rectifyFinishDate",
            value: "",
            addEditHidden: true,
          },
          {
            label: "整改状态",
            prop: "rectifyStatus",
            type: "dropDown",
            list: typeJson.rectifyStatus,
            addEditHidden: true,
            value: "",
          },
          {
            label: "复查时间",
            prop: "reviewDate",
            value: "",
          },
          {
            label: "复查人或单位",
            prop: "reviewMan",
            addEditHidden: true,
            value: "",
             hidden:true,
          },
          {
            label: "复查状态",
            prop: "reviewStatus",
            type: "dropDown",
            list: typeJson.reviewStatus,
            addEditHidden: true,
            value: "",
          },
            {
              label: '操作',
              prop: '', // 传数据的时候 忽略
              type: 'operation',
              addEditHidden: true,
              isParam: false,
              edit: false,
              delete: false,
              look: false,
              slotName: [  'costomCheck','costomLook']
            }
          ],
          select: {
            url: '/app/riskExcludeNew/getList',
            method: 'POST',
            mineId: true,
            currentPage: 1,
            pageSize: 10,
            params: {
              checkType: 3
            }
          },
        },
      }
    },
    components: {
      ReviewLook,
      ReviewCheck,
      EleTableComp,
    },
  }
</script>
<style lang="scss" scoped>
:deep(.right-select) {
  padding: 5px 12px;
  .right_base {
    .private {
      margin-top: 10px;
      margin-right: 30px;
      &:nth-child(1) {
        margin-right: 0;
      }
      &:nth-child(6) {
        margin-right: 30px;
      }
       &:nth-child(4) {
        margin-right: 400px;
      }
        &:nth-child(5) {
        margin-right: 0;
      }
         &:nth-child(8) {
        margin-right: 0;
      }
    }
  }
}
</style>